Skip to content

Ensure exceptions can get passed back from JS-Bridge to that a descriptive error can be received#1

Open
ofentsephajane wants to merge 2 commits intofusecx:mainfrom
PalotaCompany:main
Open

Ensure exceptions can get passed back from JS-Bridge to that a descriptive error can be received#1
ofentsephajane wants to merge 2 commits intofusecx:mainfrom
PalotaCompany:main

Conversation

@ofentsephajane
Copy link
Copy Markdown

This pull request refactors the BrazeJavascriptBridge class to make its communication methods asynchronous and improve error handling. The most important changes are grouped below:

Async refactoring of bridge methods:

  • Changed sendToNative, logCustomEvent, and logPurchase methods to be asynchronous (async) and to return results, allowing callers to await the response from the Flutter native layer. [1] [2] [3] [4]

Improved error handling and response structure:

  • Updated error handling in sendToNative to return structured JSON error messages instead of logging errors and returning nothing, making it easier for consumers to handle errors programmatically. [1] [2]

…ToNative, logCustomEvent, and logPurchase methods
…assed-back-to-JS-bridge-so-that-they-receive-a-descriptive-error

chore: enhance error handling and return descriptive messages in send…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant